Loading...
 

Set parameters

Set parameters

Set parameters

Stack
Stack Position Description
Stack(In) Top ]
Top 1 Parameter n
. . . . . .
Top-n Parameter 1
Top n-1 [
Stack(Out) -

In addition to the values n, m transmitted with the Document instruction, further parameters are transmitted to the Document object:

document a document created with Document
PAGE w n Size of a sheet (w columns, n lines) - see belowfor the meaning of n = 0
HEADER m Reserve m lines for heading
SPOOL k after k pages Start print output automatically
ORIGIN x y move upper left corner (character in line, column 0) to position x, y (specification in mm)
COLOR c Standard colour
COLORED print in colour
FONT c Standard font
CPI x x characters / inch (standard x=10)
LPI y y lines / inch (default y=6)
NO_CHANGE_OVER Margin pages are not printed
STRETCH fx fy Factors for scaling when transferring window objects to the print list

The following default values apply to the above parameters:

PAGE see instruction Document
HEADER according to the print lines output in the header
SPOOL Do not start printing automatically
ORIGIN 0 mm, 0 mm
COLOR BLACK
COLORED print in one colour
FONT 0
CPI 10
LPI 6
NO_CHANGE_OVER Margin pages are printed
STRETCH 1.0, 1.0

Besides COLOR and COLORED, COLOUR and COLOURED are also accepted. The specifications PAGE and ORIGIN can also be specified as CX_VALUEs, or directly as values with units. Every number without a unit is considered as a line/column specification in PAGE, and as a distance in millimetres in ORIGIN.

The indication SPOOL makes no sense in connection with print preview. If an attempt is made to display a preview and SPOOL was specified with SetParameters, an error message is displayed.

 document.gif (8823 Byte)

If the number of lines is zero, the document consists of a single page and no page change is automatically initiated.

Example

Document(60, 5) -> printList

// set parameters for printing:

// Set left top corner to x=10 and y=5 (ORIGIN)

// set the right bottom corner to x=-5 and y=-5 (PAGE) (see graphic above)
[ printList, ORIGIN 10 5, PAGE (-5) (-5) ] SetParameter // Set parameters for printing

[ 0, 2, printList, HEADER, T("Anlagegüterliste von ", "Asset accounts balances list of ")] PutLine
[ printList, HEADER, cyberEnterprise Copy(partner.name) ] PutLine
[ printList, FONT 7, Widget(, ListBox) ] PutLine
printList PrintDocument

 

See also